package com.ztorn.fiscale.mapper;

import java.util.List;
import com.ztorn.fiscale.domain.FiscaleRefundMatching;
import org.apache.ibatis.annotations.Param;

/**
 * 配单记录Mapper接口
 *
 * @author ztorn
 * @date 2025-09-20
 */
public interface FiscaleRefundMatchingMapper
{
    /**
     * 查询配单记录
     *
     * @param matchingId 配单记录主键
     * @return 配单记录
     */
    public FiscaleRefundMatching selectFiscaleRefundMatchingById(Long matchingId);

    /**
     * 查询配单记录列表
     *
     * @param fiscaleRefundMatching 配单记录
     * @return 配单记录集合
     */
    public List<FiscaleRefundMatching> selectFiscaleRefundMatchingList(FiscaleRefundMatching fiscaleRefundMatching);

    /**
     * 新增配单记录
     *
     * @param fiscaleRefundMatching 配单记录
     * @return 结果
     */
    public int insertFiscaleRefundMatching(FiscaleRefundMatching fiscaleRefundMatching);

    /**
     * 修改配单记录
     *
     * @param fiscaleRefundMatching 配单记录
     * @return 结果
     */
    public int updateFiscaleRefundMatching(FiscaleRefundMatching fiscaleRefundMatching);

    /**
     * 删除配单记录
     *
     * @param matchingId 配单记录主键
     * @return 结果
     */
    public int deleteFiscaleRefundMatchingById(Long matchingId);

    /**
     * 批量删除配单记录
     *
     * @param matchingIds 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteFiscaleRefundMatchingByIds(Long[] matchingIds);

    /**
     * 根据报关单ID和发票ID查询配单记录
     *
     * @param declarationId 报关单ID
     * @param invoiceId 发票ID
     * @return 配单记录
     */
    public FiscaleRefundMatching selectFiscaleRefundMatchingByDeclarationIdAndInvoiceId(@Param("declarationId") Long declarationId, @Param("invoiceId") Long invoiceId);

    /**
     * 根据状态查询配单记录列表
     *
     * @param status 状态
     * @return 配单记录集合
     */
    public List<FiscaleRefundMatching> selectFiscaleRefundMatchingListByStatus(String status);
}
